package cn.weiyang.action;

/**
 * Created by Administrator on 2017/7/1.
 */
public class CalculatorAction extends BaseAction{
    private int num1;
    private int num2;
    public String execute(){
        int res=num1/num2;
        getRequest().setAttribute("num1",num1);
        getRequest().setAttribute("num2",num2);
        getRequest().setAttribute("res",res);
        return SUCCESS;
    }
    public int getNum1() {
        return num1;
    }

    public void setNum1(int num1) {
        this.num1 = num1;
    }

    public int getNum2() {
        return num2;
    }

    public void setNum2(int num2) {
        this.num2 = num2;
    }
}
